#ifndef _TREE_H_
	#define _TREE_H_

#define TREEISNULL -1				//根节点为空
#define MEMORYMALLOCFALSE -2			//内存申请失败

typedef char datatype;

typedef struct tree_ {
	datatype data;
	struct tree_* left;
	struct tree_* right;
} tree_t;

tree_t* InitTree(datatype data);			//初始化一颗二叉树，并赋值

int InsertTree(tree_t* root, datatype data);	//向树添加数据

//int DeleteRoot(tree_t** root, datatype data);	//删除某个值为data的节点

void PrintTreePre(tree_t* root);			//前序遍历

void PrintTreeMid(tree_t* root);			//中序遍历

void PrintTreeErr(tree_t* root);			//后序遍历

void DestroyTree(tree_t** root);			//销毁二叉查找树

#endif